namespace FluentDataContract.Tests
{
    using System;
    using Attributes;

    [DataContract(typeof(AppleContract))]
    public class Apple
    {
        public int Id { get; set; }
        public string Colour { get; set; }
        public DateTime Expiry { get; set; }
        public object SomethingNullable { get; set; }
    }

    public class AppleContract : AbstractDataContract<Apple>
    {
        public AppleContract()
        {
            Object().ExcludeDefaultValues()
                    .Property(o => o.Colour)
                    .Property(o => o.Expiry)
                    .Property(o => o.SomethingNullable).ExcludeNullValues();
        }
    }
}